/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Juego;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 *
 * @author Flor
 */
public class Mazo {

    private List<Carta> lstCartas = new ArrayList();

    public List<Carta> getLstCartas() {
        return lstCartas;
    }

    public void setLstCartas(List<Carta> lstCartas) {
        this.lstCartas = lstCartas;
    }

    public Mazo() {
        String Palos[] = {"Trebol", "Diamante", "Pica", "Corazon"};

        for (int i = 0; i < 4; i++) {
            for (int j = 1; j < 14; j++) {

                Carta aux = new Carta(j, Palos[i]);
                lstCartas.add(aux);

            }

        }

        barajar();

    }

    public final void barajar() {
        Collections.shuffle(lstCartas);
        Collections.shuffle(lstCartas);
    }

    public void imprimir() {
        for (int i = 0; i < lstCartas.size(); i++) {

            System.out.println(lstCartas.get(i).getNumero() + " " + lstCartas.get(i).getPalo());
        }
    }
}
